﻿function searchNearby(lat, lon, success, fail)
{
    try
    {
        $.ajax({
            "url": "stops/quicksearch?lat=" + lat + "&lon=" + lon+"&range='1:30:00'",
            "success": success,
            "error": fail,
            "timeout": fail
        });
    }
    catch (err)
    {fail(err); }
}

function searchStops(codesStr, success, fail)
{    
    try
    {
        $.ajax({
            "url": "stops/quicksearch?codes=[" + [codesStr].join(",") + "]&range='1:30:00'",
            "success": success,
            "error": fail,
            "timeout" : fail
        });
    }
    catch (err)
    {fail(err);}
}

